<?php
/*................................................................ 
[七行 PHPCMS]                                        
 .  VERSION: 1.0                                                     
 .  Author: SevenEl sevenelement@qq.com                         
 .  Support: http://www.sevenel.cn   
................................................................*/
/*class configs
* */
class Sys {
	const VERSION = 1.0;
	//configure database
	private static $nowclass = array(); 
	
	//configure The web arguments					
	private static $webcfg = "七行";
	/***function Gv($name)
	 * get config arguments
	 * $name str,array
	 * retrun str or array refenrer var; 
	 */
	static function Gp($name){
		switch (func_num_args()) {
			case 0:{
				return FALSE;
				break;
			}		
			case 1:{
				if(is_array(func_get_arg(0))){
					$temp=func_get_arg(0);
					$now='';
					foreach ($temp as $value) {
						if(!$now){
							$now=self::${$value};
						}else{
							$now=$now[$value];
						}
						
					}
					return $now;
				}else {
					return self::${func_get_arg(0)};
				}
				
				break;
			}			
			default:{
					return FALSE;
				break;				
			}
		}
	} 
}
//print_r(Sys::Gv(array('dbcfg','1')));
//print_r(Sys::Gv('webcfg'));
?>